{% extends "base.html" %}
{% block main %}
        <div id="page-wrapper">

            <div class="container-fluid">

                <!-- Page Heading -->
                <div class="row">
                    <div class="col-lg-12">
                        <h3 class="page-header">
                            Download Page
                        </h3>
                        <ol class="breadcrumb">
                            <li>
                                <i class="fa fa-dashboard"></i>  <a href="../index">Dashboard</a>
                            </li>
                            <li class="active">
                                <i class="fa fa-file"></i> Download Page
                            </li>
                        </ol>
                    </div>
                </div>
                <!-- /.row -->

            </div>
            <!-- /.container-fluid -->
            <div class="panel-body">
                <div class="col-lg-12">
                    <div class="table-responsive">
                        <table class="table table-hover">
                            <thead>
                                <tr>
                                    <th class="col-lg-6">Title</th>
                                    <th class="col-lg-2">Password</th>
                                    <th class="col-lg-2">Uploader</th>
                                    <th class="col-lg-2">Upload time</th>
                                </tr>
                            </thead>
                            <tbody>
{#                            {% for list in downlist %}#}
{#                                <tr>#}
{#                                    <td><a href="{{ list.link }}">{{ list.title }}</a></td>#}
{#                                    <td>{{ list.password }}</td>#}
{#                                    <td>{{ list.creatdate }}</td>#}
{#                                </tr>#}
{#                            {% endfor %}#}
                             {% for list in articlelist.object_list %}
                                <tr>
                                    <td><a href="{{ list.link }}">{{ list.title }}</a></td>
                                    <td>{{ list.password }}</td>
                                    <td>{{ list.uploader }}</td>
                                    <td>{{ list.creatdate }}</td>
                                </tr>
                            {% endfor %}
                            </tbody>
                        </table>
                    </div>
                </div>

                <div class = 'row col-lg-12' style="text-align: center">
                     <span class="step-links">
                     <ul class="pager">
                         {% if articlelist.has_previous %}
                         <li class="preview">
                             <a href="?page={{ articlelist.previous_page_number }}">上一页</a>
                         </li>
                         {% endif %}
                        <span class="current" >
                         第 {{ articlelist.number }}/{{ articlelist.paginator.num_pages }} 页
                        </span>
                         {% if articlelist.has_next %}
                         <li class="preview">
                             <a href="?page={{ articlelist.next_page_number }}" class="next">下一页</a>
                         </li>
                         {% endif %}
                         <li class="next"><a>共{{ downlist.count }}条</a></li>
                     </ul>
                    </span>


                </div>
            </div>

                    <!-- /.col-sm-4 -->
                </div>
        </div>
        <!-- /#page-wrapper -->

    </div>
    <!-- /#wrapper -->

    <!-- jQuery -->
    <script src="../static/js/jquery.js"></script>

    <!-- Bootstrap Core JavaScript -->
    <script src="../static/js/bootstrap.min.js"></script>
{% endblock %}
</body>

</html>
